#include <iostream>
#include <fstream>

#include "student.hpp"

using namespace std;

void Student::set(const string& s_id, const string& s_name) {
    student_id = s_id;
    name = s_name;
}
void Student::print() const {
    cout << "Student ID: " << student_id << ", Name: " << name << endl;
}
void Student::save() const {
    ofstream file("student.txt", ios::app);
    if (file.is_open()) {
        file << "Student ID: " << student_id << ", Name: " << name << endl;
        file.close();
    } else {
        cerr << "Unable to open file for writing." << endl;
    }
}
vector<string> Student::get() const {
    return {student_id, name};
}